package i_Hash;

import java.util.HashSet;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package i_Hash
 * @date 2024/4/10 下午7:11
 */
        public class Test03 {
            public static void main(String[] args) {
                HashSet<Person> set = new HashSet<>();
                set.add(new Person("张三", 18));
                set.add(new Person("李四", 19));
                set.add(new Person("张三", 18));
                System.out.println(set);//[Person{name='张三', age=18}, Person{name='李四', age=19}]
            }

        }
